<include file="sport_head"/>

    <div class="module-main diy-scrollbar">
        <div>
            <div>
                <div class="main-container">
    
    
    <foreach name="list" item="info">
    <div class="match-item">
        <div class="row info match-more-info">
            <div class="col-xs-3">
                <span class="match-time info-warning">下22'</span>
                <span class="info-warning"><span class="score-num">0</span> : <span class="score-num">0</span></span>
            </div>
            <div class="col-xs-6"><span class="match-start-time">06-05&nbsp;&nbsp;04:00</span></div>
            <div class="col-xs-3">
                <span class="info-warning">滚球
                    <span aria-hidden="true" class="fa fa-futbol-o fa-spin match-icon"></span>
                </span>
            </div>
        </div>
        <div class="row team-info">
            <div class="col-xs-4 team-h-area">{$info.home_team}</div>
            <div class="col-xs-4 info-area"><span class="team-h-txt">主</span> <span class="vs-txt">VS</span> <span class="team-c-txt">客</span></div>
            <div class="col-xs-4 team-c-area">{$info.away_team}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[全] 独赢">[全] 独赢</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.dy_h}" data-id="{$info.match_id}" data-btype="dy_h" data-btitle="{$info.home_team}" onclick="selectMatch('{$info.match_id}','ft','ds','dy_h','.modal');">主 {$info.dy_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.dy_c}" data-id="{$info.match_id}" data-btype="dy_c" data-btitle="{$info.away_team}" onclick="selectMatch('{$info.match_id}','ft','ds','dy_c','.modal');">客 {$info.dy_c}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.dy_d}" data-id="{$info.match_id}" data-btype="dy_d" data-btitle="和" onclick="selectMatch('{$info.match_id}','ft','ds','dy_d','.modal');">和 {$info.dy_d}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[全] 让球">[全] 让球</div>
            <div class="col-xs-3">
                主 {$info.rq_h_name}
            </div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.rq_h}" data-id="{$info.match_id}" data-btype="rq_h" data-btitle="{$info.home_team}" onclick="selectMatch('{$info.match_id}','ft','ds','rq_h','.modal');">主 {$info.rq_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.rq_c}" data-id="{$info.match_id}" data-btype="rq_c" data-btitle="{$info.away_team}" onclick="selectMatch('{$info.match_id}','ft','ds','rq_c','.modal');">客 {$info.rq_c}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[全] 大小">[全] 大小</div>
            <div class="col-xs-3">{$info.dx_h_name}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.dx_h}" data-id="{$info.match_id}" data-btype="dx_h" data-btitle="大" onclick="selectMatch('{$info.match_id}','ft','ds','dx_h','.modal');">大{$info.dx_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.dx_c}" data-id="{$info.match_id}" data-btype="dx_c" data-btitle="小" onclick="selectMatch('{$info.match_id}','ft','ds','dx_c','.modal');">小 {$info.dx_c}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[全] 单双">[全] 单双</div>
            <div class="col-xs-3">/</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.ds_h}" data-id="{$info.match_id}" data-btype="ds_h" data-btitle="单" onclick="selectMatch('{$info.match_id}','ft','ds','ds_h','.modal');">单{$info.ds_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.ds_c}" data-id="{$info.match_id}" data-btype="ds_c" data-btitle="双" onclick="selectMatch('{$info.match_id}','ft','ds','ds_c','.modal');">双 {$info.ds_c}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[半] 独赢">[半] 独赢</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.fh_dy_h}" data-id="{$info.match_id}" data-btype="fh_dy_h" data-btitle="{$info.home_team}" onclick="selectMatch('{$info.match_id}','ft','ds','fh_dy_h','.modal');">主 {$info.fh_dy_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.fh_dy_c}" data-id="{$info.match_id}" data-btype="fh_dy_c" data-btitle="{$info.away_team}" onclick="selectMatch('{$info.match_id}','ft','ds','fh_dy_c','.modal');">客 {$info.fh_dy_c}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.fh_dy_d}" data-id="{$info.match_id}" data-btype="fh_dy_d" data-btitle="和" onclick="selectMatch('{$info.match_id}','ft','ds','fh_dy_d','.modal');">和 {$info.fh_dy_d}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[半] 让球">[半] 让球</div>
            <div class="col-xs-3">
                主 {$info.fh_rq_h_name}
            </div>
            <div class="col-xs-3 rate-btn" data-rate=" {$info.fh_rq_h}" data-id="{$info.match_id}" data-btype="fh_rq_h" data-btitle="{$info.home_team}" onclick="selectMatch('{$info.match_id}','ft','ds','fh_rq_h','.modal');">主 {$info.fh_rq_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.fh_rq_x}" data-id="{$info.match_id}" data-btype="fh_rq_c" data-btitle="{$info.away_team}" onclick="selectMatch('{$info.match_id}','ft','ds','fh_rq_c','.modal');">客 {$info.fh_rq_h}</div>
        </div>
        <div class="row rate-row">
            <div class="col-xs-3 bet-type" data-type="[半] 大小">[半] 大小</div>
            <div class="col-xs-3">{$info.fh_dx_h_name}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.fh_dx_h}" data-id="{$info.match_id}" data-btype="fh_dx_h" data-btitle="大" onclick="selectMatch('{$info.match_id}','ft','ds','fh_dx_h','.modal');">大 {$info.fh_dx_h}</div>
            <div class="col-xs-3 rate-btn" data-rate="{$info.fh_dx_c}" data-id="{$info.match_id}" data-btype="fh_dx_c" data-btitle="小" onclick="selectMatch('{$info.match_id}','ft','ds','fh_dx_c','.modal');">小 {$info.fh_dx_c}</div>
        </div>
    </div>
   </foreach>

   </div>
    
</div>
            </div>
        </div>
    </div>


</div>
</div>

<div class="modal fade in" tabindex="-1" role="dialog" id="_modal_id_6"><div class="modal-dialog modal-lg" role="document" aria-hidden="true"><div class="modal-content"><div class="modal-header"><button type="button" class="close" aria-label="Close" onclick="hideModal('.modal');"><span aria-hidden="true">×</span></button><h4 class="modal-title">{$info.match_name}</h4></div><div class="modal-body"><iframe scrolling="no" frameborder="no" border="0" src="" width="100%" height="0" name="orderFrame" id="orderFrame"></iframe></div></div></div></div>

<script>
function selectMatch(match_id,stype,type,btype,obj){
    var modal = $(obj);
    modal.show();

  if( type =='ds'){
     $("#orderFrame").attr("src","/index.php/sport/order/match_id/"+match_id+"?stype="+stype+"&type="+type+"&btype="+btype);
   // $("#orderFrame").attr("src","/index.php/sport/match_bet");
  }else{
    $("#orderFrame").attr("src","/index.php/sport/order/order/"+match_id+"?stype="+stype+"&type="+type+"&btype="+btype);
  }
}

function hideModal(obj){
  var modal = $(obj);
  if(modal.length > 0){ 
    modal.hide(); 
  }
} 
function frameHeight(id,height){
    var initHeight = $("#"+id).attr('height');
    if( height>initHeight){
        $("#"+id).height(height);
    }else{
        $("#"+id).height(initHeight);
    }
}
</script>
</body>
</html>